package com.gla.giliair.service;

import com.gla.giliair.entity.Company;
import com.gla.giliair.entity.MOrder;
import com.gla.giliair.entity.MOrderExample;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author: Yingtian qian
 * @Date: 2021/8/24 19:05
 */
public interface OrderService {

    MOrder selectOrderById(Long orderId);

    MOrder selectOrderByNumber(String orderNumber);

    MOrder selectOrderByIDNumberAndFlightId(String IDNumber, Long flightId);

    List<MOrder> selectOrdersByCustomerId(Long customerId);

    List<MOrder> selectOrdersByCustomerIdAndStates(Long customerId, List<Integer> stateList);

    List<MOrder> selectOrdersByStates(List<Integer> stateList, MOrderExample orderBy);

    List<MOrder> selectOrdersByIDNumberAndStates(String IDNumber, List<Integer> stateList);

    Map<String, Object> findOrdersByCustomerIdAndStates(Long customerId, List<Integer> stateList, Integer page, Integer pageSize);

    Map<String, Object> createOrder(MOrder mOrder);

    Map<String, Object> cancelOrder(MOrder mOrder);

    Map<String, Object> autoCancelOrder(MOrder mOrder);

    Map<String, Object> freePay(MOrder mOrder);

    Map<String, Object> freeRefund(MOrder mOrder);

    Map<String, Object> returnPay(MOrder mOrder);

    Map<String, Object> findOrdersByStates(List<Integer> stateList, String sort, boolean isASC, Integer page, Integer pageSize);

    Map<String, Object> findOrdersByIDNumberAndStates(String IDNumber, List<Integer> stateList, Integer page, Integer pageSize);

    Map<String, Object> getCount();

    Map<String, Object> modifyOrder(MOrder mOrder);

    Map<String, Object> printTicket(Long orderId);

    Map<String,Object> applyRefund(MOrder mOrder);
}
